import Api from '@core/http/decorates/api';
import { AxiosInstance } from 'axios';

@Api({ prefix: 'image' })
export class Image {
  private readonly http: AxiosInstance;

  /**
   * 上传图片
   *
   * @param {FormData} formData
   * @return {*}
   * @memberof Note
   */
  async uploadImage(formData: FormData) {
    return (await this.http.post<string>('uploadImage', formData)).data;
  }
}
